<!-- 核心概览 -- 控制器 -->
<!doctype html>
<html ng-app="myApp">
    <head>
        <script src="http://apps.bdimg.com/libs/angular.js/1.4.0-beta.4/angular.min.js"></script>
    </head>
    <body>
        <div ng-controller="MyCtrl">
            Hello {{name}}!
            <button ng-click="action()">
                OK
            </button>
        </div>
        <script>
            var app = angular.module("myApp", []);
            app.controller('MyCtrl', function($scope) {
                $scope.action = function () {
                    $scope.name = 'OK';
                }
                $scope.name = 'World';
            }
            );
        </script>
    </body>
</html>

